home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Macintosh Tracker Source / Tracker Client Folder / CMyDocument.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-23  |  6.9 KB  |  233 lines  |  [TEXT/KAHL]

  1. /* CMyDocument.h */
  2.  
  3. #pragma once
  4.  
  5. #include "CDocument.h"
  6. #include <Aliases.h>
  7. #include <Processes.h>
  8. #include <AppleEvents.h>
  9.  
  10. class CWindow;
  11. class CArray;
  12. class CSongList;
  13. class CPicture;
  14. class CStaticText;
  15. class CCheckbox;
  16. class CNumberEdit;
  17.  
  18. class CStopButton;
  19. class CRewindButton;
  20. class CFastForwardButton;
  21. class CSkipToNextButton;
  22. class CStaticText;
  23. class CAutoNextSong;
  24. class CRepeat;
  25. class CRandomize;
  26. class CAutoStartSongs;
  27. class CDefaultStereoOn;
  28. class CDefaultAntiAliasing;
  29. class CDefaultSamplingRate;
  30. class CDefaultStereoMix;
  31. class CDefaultNumRepeats;
  32. class CDefaultSpeed;
  33. class CDefaultVolume;
  34. class CSpecificStereoOn;
  35. class CSpecificAntiAliasing;
  36. class CSpecificSamplingRate;
  37. class CSpecificStereoMix;
  38. class CSpecificNumRepeats;
  39. class CSpecificSpeed;
  40. class CSpecificVolume;
  41. class COverrideStereoOn;
  42. class COverrideAntiAliasing;
  43. class COverrideSamplingRate;
  44. class COverrideStereoMix;
  45. class COverrideNumRepeats;
  46. class COverrideSpeed;
  47. class COverrideVolume;
  48. class CNumOutputBits;
  49.  
  50. #define SongNameLength (32)
  51.  
  52. typedef enum
  53.     {
  54.         eTrackerMarkEspie = 0,
  55.         eTrackerFrankSeide = 1,
  56.         eTrackerAntoineRosset = 2
  57.     } TrackerTypes;
  58.  
  59. typedef struct
  60.     {
  61.         MyBoolean                SamplingRateOverrideDefault;
  62.         ushort                    SamplingRate;
  63.         MyBoolean                StereoOnOverrideDefault;
  64.         MyBoolean                StereoOn;
  65.         MyBoolean                StereoMixOverrideDefault;
  66.         short                        StereoMix;
  67.         MyBoolean                AntiAliasingOverrideDefault;
  68.         MyBoolean                AntiAliasing;
  69.         MyBoolean                SpeedOverrideDefault;
  70.         short                        Speed;
  71.         MyBoolean                NumRepeatsOverrideDefault;
  72.         short                        NumRepeats;
  73.         MyBoolean                VolumeOverrideDefault;
  74.         short                        Volume;
  75.         TrackerTypes        Tracker;
  76.         AliasRecord**        SongLocation;
  77.         uchar                        SongName[SongNameLength];
  78.  
  79.         MyBoolean                PlayedFlag;  /* for randomize */
  80.     } SongRec;
  81.  
  82. /* possible player states */
  83. enum    {PlayerLaunching, PlayerWaitingForInit, PlayerRunning, PlayerDying};
  84.  
  85. struct    CMyDocument    :    CDocument
  86.     {
  87.         CWindow*                                RootWindow;
  88.         FSSpec                                    TheFile;
  89.         MyBoolean                                EverSaved;
  90.         MyBoolean                                UpToDate;
  91.         CArray*                                    ListOfSongs;
  92.         MyBoolean                                FileOpenFlag;
  93.         short                                        FileRef;
  94.  
  95.         ushort                                    SamplingRate;
  96.         MyBoolean                                StereoOn;
  97.         short                                        StereoMix;
  98.         MyBoolean                                AntiAliasing;
  99.         short                                        Speed;
  100.         short                                        NumRepeats;
  101.         short                                        Volume;
  102.         MyBoolean                                AutoNextSong;
  103.         MyBoolean                                Repeat;
  104.         MyBoolean                                AutoStartSongs;
  105.         MyBoolean                                Randomize;
  106.         MyBoolean                                UseSixteenBitMode;
  107.  
  108.         long                                        Selection;
  109.  
  110.         CSongList*                            SongList;
  111.         CPicture*                                PausePlayButton;
  112.         CStopButton*                        StopButton;
  113.         CRewindButton*                    RewindButton;
  114.         CFastForwardButton*            FastForwardButton;
  115.         CSkipToNextButton*            SkipToNextButton;
  116.         CAutoNextSong*                    AutoNextSongBox;
  117.         CRepeat*                                RepeatBox;
  118.         CAutoStartSongs*                AutoStartSongsBox;
  119.         CRandomize*                            RandomizeBox;
  120.         CDefaultStereoOn*                DefaultStereoOnBox;
  121.         CDefaultAntiAliasing*        DefaultAntiAliasingBox;
  122.         CDefaultSamplingRate*        DefaultSamplingRateBox;
  123.         CDefaultStereoMix*            DefaultStereoMixBox;
  124.         CDefaultNumRepeats*            DefaultNumRepeatsBox;
  125.         CDefaultSpeed*                    DefaultSpeedBox;
  126.         CDefaultVolume*                    DefaultVolumeBox;
  127.         CSpecificStereoOn*            SpecificStereoOnBox;
  128.         CSpecificAntiAliasing*    SpecificAntiAliasingBox;
  129.         CSpecificSamplingRate*    SpecificSamplingRateBox;
  130.         CSpecificStereoMix*            SpecificStereoMixBox;
  131.         CSpecificNumRepeats*        SpecificNumRepeatsBox;
  132.         CSpecificSpeed*                    SpecificSpeedBox;
  133.         CSpecificVolume*                SpecificVolumeBox;
  134.         CStaticText*                        SpecificSamplingRateText;
  135.         CStaticText*                        SpecificStereoMixText;
  136.         CStaticText*                        SpecificNumRepeatsText;
  137.         CStaticText*                        SpecificSpeedText;
  138.         CStaticText*                        SpecificVolumeText;
  139.         COverrideStereoOn*            OverrideStereoOnBox;
  140.         COverrideAntiAliasing*    OverrideAntiAliasingBox;
  141.         COverrideSamplingRate*    OverrideSamplingRateBox;
  142.         COverrideStereoMix*            OverrideStereoMixBox;
  143.         COverrideNumRepeats*        OverrideNumRepeatsBox;
  144.         COverrideSpeed*                    OverrideSpeedBox;
  145.         COverrideVolume*                OverrideVolumeBox;
  146.         CNumOutputBits*                    NumOutputBitsBox;
  147.  
  148.         MyBoolean                                PlayNextWhenThisOneStops;
  149.         long                                        SongToStart;
  150.         MyBoolean                                PlayerExists;
  151.         short                                        PlayerState;
  152.         long                                        Playing; /* index of song being played */
  153.         ProcessSerialNumber            OurPlayer;
  154.  
  155.  
  156.         /* */                CMyDocument();
  157.         /* */                ~CMyDocument();
  158.         void                DoNewFile(void);
  159.         MyBoolean        GoAway(void);
  160.         void                DoPrint(void);
  161.         void                DoOpenFile(FSSpec* TheSpec);
  162.         MyBoolean        SaveFile(void);
  163.         MyBoolean        SaveFileAs(void);
  164.         void                WriteData(void);
  165.         void                AddSong(FSSpec* TheSpec);
  166.         void                CancelCurrentSong(void);
  167.         void                StartThisSong(long SongIndex);
  168.         void                RemoveSongFromList(long SongIndex);
  169.         void                MakeNewWindow(void);
  170.         void                DoIdle(long Stupid);
  171.         void                SetNewSelection(long NewSelection);
  172.         void                MoveSong(long SongIndex, long NewIndex);
  173.  
  174.         void                SetStereoOn(MyBoolean NewStereoOn);
  175.         void                SetAntiAliasing(MyBoolean NewAntiAliasing);
  176.         void                SetSamplingRate(ulong NewSamplingRate);
  177.         void                SetStereoMix(short NewStereoMix);
  178.         void                SetNumRepeats(short NewNumRepeats);
  179.         void                SetSpeed(short NewSpeed);
  180.         void                SetVolume(short NewVolume);
  181.         void                SetOverrideStereoOn(MyBoolean Flag);
  182.         void                SetOverrideAntiAliasing(MyBoolean Flag);
  183.         void                SetOverrideSamplingRate(MyBoolean Flag);
  184.         void                SetOverrideStereoMix(MyBoolean Flag);
  185.         void                SetOverrideNumRepeats(MyBoolean Flag);
  186.         void                SetOverrideSpeed(MyBoolean Flag);
  187.         void                SetOverrideVolume(MyBoolean Flag);
  188.         void                SetDefaultStereoOn(MyBoolean NewStereoOn);
  189.         void                SetDefaultAntiAliasing(MyBoolean NewAntiAliasing);
  190.         void                SetDefaultSamplingRate(ulong NewSamplingRate);
  191.         void                SetDefaultStereoMix(short NewStereoMix);
  192.         void                SetDefaultNumRepeats(short NewNumRepeats);
  193.         void                SetDefaultSpeed(short NewSpeed);
  194.         void                SetDefaultVolume(short NewVolume);
  195.         void                SetNumOutputBits(MyBoolean SixteenBitMode);
  196.         void                SetTrackerServerToUse(TrackerTypes WhatKind);
  197.         TrackerTypes    FindOutTrackerServerToUse(void);
  198.  
  199.         void                SetAutoNextSong(MyBoolean NewAutoNextSong);
  200.         void                SetRepeat(MyBoolean NewRepeat);
  201.         void                SetAutoStartSongs(MyBoolean NewAutoStartSongs);
  202.         void                SetRandomize(MyBoolean NewRandomize);
  203.         void                ResetRandomPlayList(void);
  204.         void                StartRandomSong(void);
  205.  
  206.         void                SendMessage(short TheMessage, DescType TheKeyWord);
  207.  
  208.         void                DoRewind(MyBoolean Flag);
  209.         void                DoStop(void);
  210.         void                DoPlay(void);
  211.         void                DoPause(void);
  212.         void                DoFastForward(MyBoolean Flag);
  213.         void                DoSkipToNext(void);
  214.         void                DoVolumeUp(void);
  215.         void                DoVolumeDown(void);
  216.  
  217.         void                PlayerDiedNotification(void);
  218.         void                PlayerLaunchedNotification(ProcessSerialNumber TheProcNum);
  219.     };
  220.  
  221.  
  222. /* menu options */
  223. #define mDeleteSelection (0x1000)
  224. #define mPlaySelection (0x1001)
  225. #define mStopPlaying (0x1002)
  226. #define mIncreaseVolume (0x1003)
  227. #define mDecreaseVolume (0x1004)
  228. #define mShowSelection (0x1005)
  229. #define mShowPlaying (0x1006)
  230. #define mUseEspieTracker (0x1007)
  231. #define mUseSeideTracker (0x1008)
  232. #define mUseRossetTracker (0x1009)
  233.